<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
  <head>
    <title>
    </title>
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="css/index.css">
    <link rel="stylesheet" href="css/ui-btn.css">
    <link rel="stylesheet" href="css/ui-base.css">
    <link rel="stylesheet" href="css/ui-box.css">
    <link rel="stylesheet" href="css/ui-color.css">
    <link rel="stylesheet" href="css/ui-res.css">
    <style>
        input{
            color: black;
            padding: 1px 6px;
            margin-left:6px;
        }
        input[type="text"]{
            padding: .2em .4em;
            margin:.4em .6em;
            font-size:1em;
        }
        input[type="button"]{
            padding: .6em .8em;
            margin:.4em .6em;
            font-size:1.2em;
        }
    </style>
    <script src="js/zy_control.js">
    </script>
    <script src="js/main.js">
    </script>
    <script type="text/javascript">
        window.uexOnload = function(type){
            uexWindow.subscribeChannelNotification("1", "easemobDemoGlobalPost");
            uexWindow.easemobDemoGlobalPost=globalPost;
        }
    

//[5.7]
function createPrivateGroup(){
    var groupName = document.getElementById("createPrivateGroupgroupName").value;
    var desc = document.getElementById("createPrivateGroupdesc").value;
    var members = document.getElementById("createPrivateGroupmembers").value;
    var allowInvite = document.getElementById("createPrivateGroupallowInvite").value;
    var maxUsers = document.getElementById("createPrivateGroupmaxUsers").value;
    var initialWelcomeMessage = document.getElementById("createPrivateGroupinitialWelcomeMessage").value;
    uexEasemob.createPrivateGroup('{"groupName":"'+groupName+'","desc":"'+desc+'","members":'+members+',"allowInvite":"'+allowInvite+'","maxUsers":"'+maxUsers+'","initialWelcomeMessage":"'+initialWelcomeMessage+'"}');
}
    
    //[5.8]
    function createPublicGroup(){
        var groupName = document.getElementById("createPublicGroupgroupName").value;
        var desc = document.getElementById("createPublicGroupdesc").value;
        var members = document.getElementById("createPublicGroupmembers").value;
        var needApprovalRequired = document.getElementById("createPublicGroupneedApprovalRequired").value;
        var maxUsers = document.getElementById("createPublicGroupmaxUsers").value;
        var initialWelcomeMessage = document.getElementById("createPublicGroupinitialWelcomeMessage").value;
        uexEasemob.createPublicGroup('{"groupName":"'+groupName+'","desc":"'+desc+'","members":'+members+',"needApprovalRequired":"'+needApprovalRequired+'","maxUsers":"'+maxUsers+'","initialWelcomeMessage":"'+initialWelcomeMessage+'"}');
    }
    
    //[5.9]
    function addUsersToGroup(){
        var isGroupOwner = document.getElementById("addUsersToGroupisGroupOwner").value;
        var groupId = document.getElementById("addUsersToGroupgroupId").value;
        var newmembers = document.getElementById("addUsersToGroupnewmembers").value;
        uexEasemob.addUsersToGroup('{"isGroupOwner":"'+isGroupOwner+'","groupId":"'+groupId+'","newmembers":'+newmembers+'}');
    }
    
    //[5.10]
    function removeUserFromGroup(){
        var groupId = document.getElementById("removeUserFromGroupgroupId").value;
        var username = document.getElementById("removeUserFromGroupusername").value;
        uexEasemob.removeUserFromGroup('{"groupId":"'+groupId+'","username":"'+username+'"}');
    }
    
    //[5.11]
    function joinGroup(){
        var groupId = document.getElementById("joinGroupgroupId").value;
        var reason = document.getElementById("joinGroupreason").value;
        var groupName = document.getElementById("joinGroupgroupName").value;
        uexEasemob.joinGroup('{"groupId":"'+groupId+'","reason":"'+reason+'","groupName":"'+groupName+'"}');
    }
    
    //[5.12]
    function exitFromGroup(){
        var groupId = document.getElementById("exitFromGroupgroupId").value;
        uexEasemob.exitFromGroup('{"groupId":"'+groupId+'"}');
    }
    
    //[5.13]
    function exitAndDeleteGroup(){
        var groupId = document.getElementById("exitAndDeleteGroupgroupId").value;
        uexEasemob.exitAndDeleteGroup('{"groupId":"'+groupId+'"}');
    }
    
    //[5.14]
    function getGroupsFromServer(){
        var loadCache = document.getElementById("getGroupsFromServerloadCache").value;
        uexEasemob.getGroupsFromServer('{"loadCache":"'+loadCache+'"}');
    }
    
    //[5.16]
    function getAllPublicGroupsFromServer(){
        var pageSize = document.getElementById("getAllPublicGroupsFromServerpageSize").value;
        var cursor = document.getElementById("getAllPublicGroupsFromServercursor").value;
        uexEasemob.getAllPublicGroupsFromServer('{"pageSize":"'+pageSize+'","cursor":"'+cursor+'"}');
    }
    
    //[5.18]
    function getGroup(){
        var groupId = document.getElementById("getGroupgroupId").value;
        var loadCache = document.getElementById("getGrouploadCache").value;
        uexEasemob.getGroup('{"groupId":"'+groupId+'","loadCache":"'+loadCache+'"}');
    }
    
    //[5.20]
    function blockGroupMessage(){
        var groupId = document.getElementById("blockGroupMessagegroupId").value;
        uexEasemob.blockGroupMessage('{"groupId":"'+groupId+'"}');
    }
    
    //[5.21]
    function unblockGroupMessage(){
        var groupId = document.getElementById("unblockGroupMessagegroupId").value;
        uexEasemob.unblockGroupMessage('{"groupId":"'+groupId+'"}');
    }
    
    //[5.22]
    function changeGroupName(){
        var groupId = document.getElementById("changeGroupNamegroupId").value;
        var changedGroupName = document.getElementById("changeGroupNamechangedGroupName").value;
        uexEasemob.changeGroupName('{"groupId":"'+groupId+'","changedGroupName":"'+changedGroupName+'"}');
    }
    
    //[5.23]
    function setReceiveNotNoifyGroup(){
        var groupIds = document.getElementById("setReceiveNotNoifyGroupgroupIds").value;
        uexEasemob.setReceiveNotNoifyGroup('{"groupIds":"'+groupIds+'"}');
    }
    
    //[5.24]
    function blockUser(){
        var groupId = document.getElementById("blockUsergroupId").value;
        var username = document.getElementById("blockUserusername").value;
        uexEasemob.blockUser('{"groupId":"'+groupId+'","username":"'+username+'"}');
    }
    
    //[5.25]
    function unblockUser(){
        var groupId = document.getElementById("unblockUsergroupId").value;
        var username = document.getElementById("unblockUserusername").value;
        uexEasemob.unblockUser('{"groupId":"'+groupId+'","username":"'+username+'"}');
    }
    
    //[5.26]
    function getBlockedUsers(){
        var groupId = document.getElementById("getBlockedUsersgroupId").value;
        uexEasemob.getBlockedUsers('{"groupId":"'+groupId+'"}');
    }
    


       </script>
</head>
<body class="um-vp " ontouchstart>
    <div id="page_0" class="up ub ub-ver" tabindex="0">
            <!--header开始-->
            <div id="header" class="uh t-wh ub" style="background: #27A73F;">
                <div class="umw4 ub ub-ac ub-pc" ontouchstart="zy_touch()" onclick="closeWin()">
                    <div ontouchstart="zy_touch('btn-act')" class="btn uba b-bla uinn5 c-blu c-m1 uc-a t-wh" style="background: -webkit-gradient(linear,0 0,0 100%,from(#FFCD00),color-stop(50%,#FFBC00),color-stop(50%,orange));border: 1px solid #FFA700;-webkit-border-radius: 8px;  text-align: center;color: #712000;  display: block; font-size: 1em; padding: 0.2em;">返回</div>
                </div>
                <h1 class="ut ub-f1 ulev0 ut-s tx-c" tabindex="0">Group</h1>
                <div class="umw4" ontouchstart="zy_touch()" onclick="">
                <!--插入按钮控件-->
                </div>
     </div>
     <!--header结束--><!--content开始-->
     <div id="content" class="ub-f1 tx-l t-bla" style="">
         
     <div class="conbor">
        <div class="consj" id="topDiv">
            <div id='globalPostArea'>全局广播显示区域</div><br><br>
            
            
             <div> </div><div>======Group==========</div>
             
             <div> </div><span>createPrivateGroup</span>
             <div>groupName:</div><input class="textbox" type="text" id="createPrivateGroupgroupName" value="testPrivateGroup"></input>
             <div>desc:</div><input class="textbox" type="text" id="createPrivateGroupdesc" value="uexEasemobPrivateGroupTest"></input>
             <div>members:</div><input class="textbox" type="text" id="createPrivateGroupmembers" value='["appcanuser2"]'></input>
             <div>allowInvite:</div><input class="textbox" type="text" id="createPrivateGroupallowInvite" value="1"></input>
             <div>maxUsers:</div><input class="textbox" type="text" id="createPrivateGroupmaxUsers" value="20"></input>
             <div>initialWelcomeMessage:</div><input class="textbox" type="text" id="createPrivateGroupinitialWelcomeMessage" value="Welcome to a Private Group!"></input>
             <input class='btn' type='button' value='调用接口' onclick='createPrivateGroup()'></input>
             
             <div> </div><span> createPublicGroup</span>
             <div>groupName:</div><input class="textbox" type="text" id="createPublicGroupgroupName" value="testPublicGroup222"></input>
             <div>desc:</div><input class="textbox" type="text" id="createPublicGroupdesc" value="uexEasemobPublicGroupTest"></input>
             <div>members:</div><input class="textbox" type="text" id="createPublicGroupmembers" value='["appcanuser2"]'></input>
             <div>needApprovalRequired:</div><input class="textbox" type="text" id="createPublicGroupneedApprovalRequired" value="1"></input>
             <div>maxUsers:</div><input class="textbox" type="text" id="createPublicGroupmaxUsers" value="30"></input>
             <div>initialWelcomeMessage:</div><input class="textbox" type="text" id="createPublicGroupinitialWelcomeMessage" value="A Public Group!"></input>
             <input class='btn' type='button' value='调用接口' onclick='createPublicGroup()'></input>
             
             <div> </div><span>addUsersToGroup</span>
             <div>isGroupOwner:</div><input class="textbox" type="text" id="addUsersToGroupisGroupOwner" value=""></input>
             <div>groupId:</div><input class="textbox" type="text" id="addUsersToGroupgroupId" value=""></input>
             <div>newmembers:</div><input class="textbox" type="text" id="addUsersToGroupnewmembers" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='addUsersToGroup()'></input>
             
             <div> </div><span>removeUserFromGroup</span>
             <div>groupId:</div><input class="textbox" type="text" id="removeUserFromGroupgroupId" value=""></input>
             <div>username:</div><input class="textbox" type="text" id="removeUserFromGroupusername" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='removeUserFromGroup()'></input>
             
             <div> </div><span>joinGroup</span>
             <div>groupId:</div><input class="textbox" type="text" id="joinGroupgroupId" value=""></input>
             <div>reason:</div><input class="textbox" type="text" id="joinGroupreason" value=""></input>
             <div>groupName:</div><input class="textbox" type="text" id="joinGroupgroupName" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='joinGroup()'></input>
             
             <div> </div><span>exitFromGroup</span>
             <div>groupId:</div><input class="textbox" type="text" id="exitFromGroupgroupId" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='exitFromGroup()'></input>
             
             <div> </div><span>exitAndDeleteGroup</span>
             <div>groupId:</div><input class="textbox" type="text" id="exitAndDeleteGroupgroupId" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='exitAndDeleteGroup()'></input>
             
             <div> </div><span>getGroupsFromServer</span>
             <div>loadCache:</div><input class="textbox" type="text" id="getGroupsFromServerloadCache" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='getGroupsFromServer()'></input>
             
             <div> </div><span>getAllPublicGroupsFromServer</span>
             <div>pageSize:</div><input class="textbox" type="text" id="getAllPublicGroupsFromServerpageSize" value=""></input>
             <div>cursor:</div><input class="textbox" type="text" id="getAllPublicGroupsFromServercursor" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='getAllPublicGroupsFromServer()'></input>
             
             <div> </div><span>getGroup</span>
             <div>groupId:</div><input class="textbox" type="text" id="getGroupgroupId" value=""></input>
             <div>loadCache:</div><input class="textbox" type="text" id="getGrouploadCache" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='getGroup()'></input>
             
             <div> </div><span>blockGroupMessage</span>
             <div>groupId:</div><input class="textbox" type="text" id="blockGroupMessagegroupId" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='blockGroupMessage()'></input>
             
             <div> </div><span>unblockGroupMessage</span>
             <div>groupId:</div><input class="textbox" type="text" id="unblockGroupMessagegroupId" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='unblockGroupMessage()'></input>
             
             <div> </div><span>changeGroupName</span>
             <div>groupId:</div><input class="textbox" type="text" id="changeGroupNamegroupId" value=""></input>
             <div>changedGroupName:</div><input class="textbox" type="text" id="changeGroupNamechangedGroupName" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='changeGroupName()'></input>
             
             <div> </div><span>setReceiveNotNoifyGroup</span>
             <div>groupIds:</div><input class="textbox" type="text" id="setReceiveNotNoifyGroupgroupIds" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='setReceiveNotNoifyGroup()'></input>
             
             <div> </div><span>blockUser</span>
             <div>groupId:</div><input class="textbox" type="text" id="blockUsergroupId" value=""></input>
             <div>username:</div><input class="textbox" type="text" id="blockUserusername" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='blockUser()'></input>
             
             <div> </div><span>unblockUser</span>
             <div>groupId:</div><input class="textbox" type="text" id="unblockUsergroupId" value=""></input>
             <div>username:</div><input class="textbox" type="text" id="unblockUserusername" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='unblockUser()'></input>
             
             <div> </div><span>getBlockedUsers</span>
             <div>groupId:</div><input class="textbox" type="text" id="getBlockedUsersgroupId" value=""></input>
             <input class='btn' type='button' value='调用接口' onclick='getBlockedUsers()'></input>
        <div>======回调区域==========</div>
        <div id='TestCallBack'>原本内容</div>
        <div id='TestData'>原本内容</div>
        <div>======回调区域==========</div>
    </div>
    </div>
</body>
<script>

</script>
</html>
